<template>
  <div class="profile-page">
    <div class="header">
      <div class="user-info">
        <div class="logo">
          <span class="logo-icon">📦</span>
          <span>校园快递代拿</span>
        </div>
        <div class="notification-icon" @click="showNotifications">🔔</div>
      </div>
      <div class="welcome-text">我的</div>
      <div class="subtitle">个人信息与设置</div>
    </div>

    <div class="main-content">
      <div class="back-btn" @click="$router.push('/')">
        <span>←</span> 返回首页
      </div>

      <!-- 个人信息区域 -->
      <div class="profile-section">
        <div class="avatar">张</div>
        <div class="user-name">张三</div>
        <div class="user-id">学号: 202301001</div>
        <button class="edit-profile-btn" @click="showEditProfile">编辑个人信息</button>
      </div>

      <!-- 菜单区域 -->
      <div class="menu-section">
        <div class="menu-item" @click="showEditProfile">
          <div class="menu-icon icon-edit">👤</div>
          <div class="menu-content">
            <div class="menu-title">编辑个人信息</div>
            <div class="menu-desc">修改姓名、学号、联系方式等</div>
          </div>
          <div class="menu-arrow">></div>
        </div>

        <div class="menu-item" @click="showMessages">
          <div class="menu-icon icon-message">💬</div>
          <div class="menu-content">
            <div class="menu-title">消息通知</div>
            <div class="menu-desc">查看系统消息和订单通知</div>
          </div>
          <div class="menu-arrow">></div>
        </div>

        <div class="menu-item" @click="showWithdraw">
          <div class="menu-icon icon-wallet">💰</div>
          <div class="menu-content">
            <div class="menu-title">账户提现</div>
            <div class="menu-desc">提现到微信钱包或银行卡</div>
          </div>
          <div class="menu-arrow">></div>
        </div>

        <div class="menu-item" @click="shareApp">
          <div class="menu-icon icon-share">👥</div>
          <div class="menu-content">
            <div class="menu-title">推荐给朋友</div>
            <div class="menu-desc">分享应用给同学，双方获得优惠券</div>
          </div>
          <div class="menu-arrow">></div>
        </div>

        <div class="menu-item" @click="showSettings">
          <div class="menu-icon icon-settings">⚙️</div>
          <div class="menu-content">
            <div class="menu-title">设置</div>
            <div class="menu-desc">隐私设置、修改密码等</div>
          </div>
          <div class="menu-arrow">></div>
        </div>
      </div>

      <div class="platform-info">
        <p>校园快递代拿平台 © 2025</p>
      </div>
    </div>
  </div>
</template>

<script>
import { ElMessage } from 'element-plus'

export default {
  name: 'Profile',
  methods: {
    showNotifications() {
      ElMessage.info('您有3条未读消息')
    },
    
    showEditProfile() {
      ElMessage.info('编辑个人信息功能开发中...')
    },
    
    showMessages() {
      ElMessage.info('消息通知功能开发中...')
    },
    
    showWithdraw() {
      ElMessage.info('账户提现功能开发中...')
    },
    
    shareApp() {
      ElMessage.success('分享链接已复制到剪贴板，快去邀请好友吧！')
    },
    
    showSettings() {
      ElMessage.info('设置功能开发中...')
    }
  }
}
</script>

<style scoped>
/* 复制您"我的"页面的CSS样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
}

.header {
  background: linear-gradient(135deg, #4a90e2, #5fa8ff);
  color: white;
  padding: 25px 20px;
  text-align: center;
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
}

.logo-icon {
  margin-right: 8px;
  font-size: 20px;
}

.notification-icon {
  font-size: 20px;
  cursor: pointer;
}

.welcome-text {
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: 600;
}

.subtitle {
  font-size: 14px;
  opacity: 0.9;
}

.main-content {
  padding: 20px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  color: #4a90e2;
  cursor: pointer;
  font-size: 14px;
}

.back-btn span {
  margin-left: 5px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
}

.profile-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a90e2, #67b26f);
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
}

.user-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.user-id {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.edit-profile-btn {
  background: #4a90e2;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.edit-profile-btn:hover {
  background: #3a80d2;
}

.menu-section {
  background: white;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.3s;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  background: #f9f9f9;
}

.menu-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 18px;
  color: white;
}

.icon-edit {
  background: linear-gradient(135deg, #4a90e2, #67b26f);
}

.icon-message {
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
}

.icon-wallet {
  background: linear-gradient(135deg, #a166ab, #5073b8);
}

.icon-share {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.icon-settings {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.menu-content {
  flex: 1;
}

.menu-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.menu-desc {
  font-size: 12px;
  color: #999;
}

.menu-arrow {
  color: #ccc;
  font-size: 14px;
}

.platform-info {
  margin-top: 30px;
  text-align: center;
  color: #999;
  font-size: 12px;
}
</style>